

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;

namespace DataLayer
{
	public class datArticleCategoriesContents
	{
		public datArticleCategoriesContents()
		{
		}
		
		#region  Code Factory Generated Methods
		public void DeleteArticleCategoriesContentsByArticleCategoriesContentId(entArticleCategoriesContents parEntArticleCategoriesContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pArticleCategoriesContentId",parEntArticleCategoriesContents.ArticleCategoriesContentId);
			parDbConnector.ExecuteNonQuery("DeleteArticleCategoriesContentsByArticleCategoriesContentId",insDbParamCollection);
		}
		public void InsertArticleCategoriesContents(entArticleCategoriesContents parEntArticleCategoriesContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pLanguageId",parEntArticleCategoriesContents.LanguageId);
			insDbParamCollection.Add("@pArticleCategoryId",parEntArticleCategoriesContents.ArticleCategoryId);
			insDbParamCollection.Add("@pArticleCategoryName",parEntArticleCategoriesContents.ArticleCategoryName);
			insDbParamCollection.AddOutput("@pArticleCategoriesContentId",DbType.Int32);
			parDbConnector.ExecuteNonQuery("InsertArticleCategoriesContents",insDbParamCollection);
			parEntArticleCategoriesContents.ArticleCategoriesContentId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
		}
		public void UpdateArticleCategoriesContentsByArticleCategoriesContentId(entArticleCategoriesContents parEntArticleCategoriesContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pArticleCategoriesContentId",parEntArticleCategoriesContents.ArticleCategoriesContentId);
			
			insDbParamCollection.Add("@pLanguageId",parEntArticleCategoriesContents.LanguageId);
			insDbParamCollection.Add("@pArticleCategoryId",parEntArticleCategoriesContents.ArticleCategoryId);
			insDbParamCollection.Add("@pArticleCategoryName",parEntArticleCategoriesContents.ArticleCategoryName);
			parDbConnector.ExecuteNonQuery("UpdateArticleCategoriesContentsByArticleCategoriesContentId",insDbParamCollection);
		}
        
		#endregion
        public DataTable SelectArticleCategoriesContentsByArticleCategoryId(entArticleCategoriesContents parEntArticleCategoriesContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pArticleCategoryId", parEntArticleCategoriesContents.ArticleCategoryId);
            return parDbConnector.ExecuteDataTable("SelectArticleCategoriesContentsByArticleCategoryId", insDbParamCollection);
        }
        public void DeleteArticleCategoriesContentsByArticleCategoryId(entArticleCategoriesContents parEntArticleCategoriesContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pArticleCategoryId", parEntArticleCategoriesContents.ArticleCategoryId);
            parDbConnector.ExecuteNonQuery("DeleteArticleCategoriesContentsByArticleCategoryId", insDbParamCollection);
        }
	}
}